package com.xcjh.smartchat.ui.login

import android.os.Bundle
import androidx.fragment.app.activityViewModels
import com.xcjh.base_lib.base.BaseViewModel
import com.xcjh.base_lib.base.container.ContainerFm2Activity
import com.xcjh.smartchat.R
import com.xcjh.smartchat.base.BaseFragment
import com.xcjh.smartchat.databinding.ChatFragmentLoginBinding
import com.xcjh.smartchat.ui.setting.SettingFragment

/**
 * 登录
 */
class LoginFragment : BaseFragment<LoginVM, ChatFragmentLoginBinding>() {
    private val model: LoginVM by activityViewModels()


    override fun initView(savedInstanceState: Bundle?) {
        mViewBind.vm = mViewModel
        mViewBind.titleTop.tvTitle.text = getString(R.string.login)

        mViewBind.getCode.setOnClickListener {
            model.getRoleArticle()
           // ContainerFm2Activity().startContainer2Activity(requireActivity(), SettingFragment(0))
        }
        mViewBind.btnLogin.setOnClickListener {
            model.getRoleArticle()
           // ContainerFm2Activity().startContainer2Activity(requireActivity(), SettingFragment(0))
        }
    }

    override fun createObserver() {
        model.dataConsume.observe(this) {

        }
    }


}